<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>dom</title>
    <script>
        date = new Date();
        document.write(date.getFullYear() + "-" + date.getDate() + "-" + date.getHours());
    </script>
</head>
<body>
<p id="pTag">这是一个段落</p>
<img src="http://www.baidu.com" alt="这只是一张图片" id="image">
<script>
    document.getElementById("pTag").onclick = function () {
        alert(100000);
    }

    document.getElementById("pTag").style.color="blue";
    console.log("src:" + document.getElementById("image").src);
</script>
</body>
</html>